#include "Transition.h"

pn::Transition::Transition()
{
	setId("unknown-id");
}

pn::Transition::Transition(const std::string& vId, unsigned vPriority)
{
	setId(vId);
	setPriority(vPriority);
}

pn::Transition::~Transition()
{
	
}

std::string pn::Transition::getId()
{
	return mId;
}

void pn::Transition::setId(const std::string& vId)
{
	if (!vId.empty()) mId.assign(vId);
	else mId = "unknown-id";
}

unsigned int pn::Transition::getPriority()
{
	return mPriority;
}

void pn::Transition::setPriority(unsigned int vPriority)
{
	mPriority = vPriority;
}

void pn::Transition::addPlaceFrom(const pn::PlaceToTransition* pPlaceFrom)
{
	mPlacesFrom.push_back(pPlaceFrom);
}

void pn::Transition::addPlaceTo(const pn::TransitionToPlace* pPlaceTo)
{
	mPlacesTo.push_back(pPlaceTo);
}
